﻿<!DOCTYPE html>

<html>
<head>
   <meta name="viewport" content="width=device-width" />
   <link href="~/Content/bootstrap.min.css" rel="stylesheet" />
   <script src="~/Scripts/jquery-1.9.1.js"></script>
   <script src="~/Scripts/bootstrap.min.js"></script>
   <title>@ViewBag.Title</title>
   <style type="text/css">
       body
       {
           margin: 0;
           padding: 0;
           line-height: 1.5em;
       }

       b
       {
           font-size: 110%;
       }

       em
       {
           color: red;
       }


       #topsection
       {
           background: #EAEAEA;
           height: 90px; /*Height of top section*/
       }

           #topsection h1
           {
               margin: 0;
               padding-top: 15px;
           }

       #contentwrapper
       {
           float: left;
           width: 100%;
       }

       #contentcolumn
       {
           margin-left: 200px; /*Set left margin to LeftColumnWidth*/
       }

       #leftcolumn
       {
           float: left;
           width: 200px; /*Width of left column*/
           margin-left: -100%;
       }

       #footer
       {
           clear: left;
           width: 100%;
           background: black;
           color: #FFF;
           text-align: center;
           padding: 4px 0;
       }

           #footer a
           {
               color: #FFFF80;
           }

       .innertube
       {
           margin: 10px; /*Margins for inner DIV inside each column (to provide padding)*/
           margin-top: 0;
       }
   </style>
</head>
<body>
   <div id="maincontainer">

       <div id="topsection">
           <div class="innertube">
               <div class="page-header">
                   <h2>FreightSoft</h2>
                   <h5>A Web Based Shipping and Freight Management System</h5>
                   <p style="text-align: right">
                       @if (Request.IsAuthenticated)
                       {
                           if (User.IsInRole("CUST"))
                           {
                              <img src="~/Resources/customer.png" />
                           }
                           if (User.IsInRole("SHIPAUTH") || User.IsInRole("ORDAUTH"))
                           {
                              <img src="~/Resources/admin.png" />
                           }
                           
                           <text>Welcome <strong>@User.Identity.Name</strong>!
                       [ @Html.ActionLink("Logout", "LogOff", "Account") ]</text>
                       }
                       else
                       {
                           @:[ @Html.ActionLink(" Login ", "Index", "Account") | @Html.ActionLink(" Register ", "Create", "Customer")]
                       }
                   </p>
               </div>
           </div>
       </div>

       <div id="contentwrapper">
           <div id="contentcolumn">
               <div class="innertube">@RenderBody()</div>
           </div>
       </div>
       <br />
       <div id="leftcolumn">
           <div class="innertube">
                
                   <ul class="nav nav-sidebar">
                       <li>@Html.ActionLink("Home", "", "")</li>
                       <li>@Html.ActionLink("Track Order Online","Index","Tracking")</li>
                        @if (Request.IsAuthenticated)
                        { 
                            <li>@Html.ActionLink("Order Online", "Create", "CustomerOrder", null, null)</li>
                            <li>@Html.ActionLink("Manage Orders", "Index", "CustomerOrder", null, null)</li>
                            
                            if (User.IsInRole("SHIPAUTH")){
                                <li>@Html.ActionLink("Manage Shipment Schedules", "Index", "ShipmentSchedule")</li>                               
                                <li>@Html.ActionLink("Manage Shipments", "Index", "Shipment")</li>
                                <li>@Html.ActionLink("Manage Inventory ", "", "")</li>
                            }
                        }
                   </ul>
               
           </div>
       </div>

       <div id="footer">www.FreightSoft.com</div>

   </div>
</body>
</html>
